const requireContext = require("require-context");
const path = require("path");
const courseAll = requireContext(
  path.join(__dirname, "../service/courses"),
  false,
  /\.js$/
);
let courses = {};
courseAll.keys().forEach((item) => {
  courses[item.replace(".js", "")] = courseAll(item);
});

// const courseDelete = require("../service/courses/courseDelete")
// const courses = {
//   courseDelete
// };

module.exports = courses;